package com.hp.activiti.bean;

import java.io.Serializable;

public class Result implements Serializable{

	private static final long serialVersionUID = 9169160697457252846L;
	
	private String code;
	
	private String msg;
	
	public Result(String code, String msg) {
		this.code = code;
		this.msg = msg;
	}
	
	public static Result fail(String msg){
		return new Result("0", msg);
	}
	
	public static Result success(){
		return new Result("1", "操作成功!");
	}
	
	public static Result success(String msg){
		return new Result("1", msg);
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}
}
